<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-bind</title>
     
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app"> 
        <input type="number" step="1" v-model="a"><br>
        <input type="number" step="1" v-model="b">
        <div>
            {{add}}
            <!-- {{minus()}} -->
        </div>
        人民币:: {{minus()}}
        <br>    
        过滤器的用法: 美元: {{price|fmt(7.2588)}}
    </div>

    <script>
        // var stu =new Student(name); 
        // stu.name
        var app=new Vue({
            el:"#app"
            ,data:{  //变量
                 a:1
                 ,b:1
                 ,price:999.725
            },methods: { //函数 
                minus(){
                    console.log("bbbbbbb");
                    return '$'+this.price;
                }
            },computed: { //计算属性
                add(){
                    console.log("aaaaaa----");
                    return this.a++;
                }
            },filters: { //
                fmt(money,rate){
                    return '$'+(money/rate).toFixed(2);
                }
            }

        });

       
    </script>
</body>
</html>